<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditInterventionTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditInterventionLabel_dateIntervention}" for="dateIntervention" />
                    <h:inputText id="dateIntervention" value="#{interventionController.selected.dateIntervention}" title="#{bundle.EditInterventionTitle_dateIntervention}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditInterventionLabel_dureeIntervention}" for="dureeIntervention" />
                    <h:inputText id="dureeIntervention" value="#{interventionController.selected.dureeIntervention}" title="#{bundle.EditInterventionTitle_dureeIntervention}" />
                    <h:outputLabel value="#{bundle.EditInterventionLabel_identIntervention}" for="identIntervention" />
                    <h:inputText id="identIntervention" value="#{interventionController.selected.identIntervention}" title="#{bundle.EditInterventionTitle_identIntervention}" required="true" requiredMessage="#{bundle.EditInterventionRequiredMessage_identIntervention}"/>
                    <h:outputLabel value="#{bundle.EditInterventionLabel_identType}" for="identType" />
                    <h:selectOneMenu id="identType" value="#{interventionController.selected.identType}" title="#{bundle.EditInterventionTitle_identType}" >
                        <f:selectItems value="#{typeInterventionController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditInterventionLabel_identif}" for="identif" />
                    <h:selectOneMenu id="identif" value="#{interventionController.selected.identif}" title="#{bundle.EditInterventionTitle_identif}" >
                        <f:selectItems value="#{tacheController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditInterventionLabel_idMachine}" for="idMachine" />
                    <h:selectOneMenu id="idMachine" value="#{interventionController.selected.idMachine}" title="#{bundle.EditInterventionTitle_idMachine}" >
                        <f:selectItems value="#{machineController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditInterventionLabel_identifiantArret}" for="identifiantArret" />
                    <h:selectOneMenu id="identifiantArret" value="#{interventionController.selected.identifiantArret}" title="#{bundle.EditInterventionTitle_identifiantArret}" >
                        <f:selectItems value="#{arretMachineController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{interventionController.update}" value="#{bundle.EditInterventionSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditInterventionViewLink}"/>
                <br />
                <h:commandLink action="#{interventionController.prepareList}" value="#{bundle.EditInterventionShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditInterventionIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
